package com.pig4cloud.pigx.shop.user.api.feign;

import com.pig4cloud.pigx.common.core.constant.SecurityConstants;
import com.pig4cloud.pigx.common.core.constant.ServiceNameConstants;
import com.pig4cloud.pigx.common.core.util.R;
import com.pig4cloud.pigx.shop.user.api.entity.ShopUserMoneyChangeRecord;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestHeader;

@FeignClient(contextId = "remoteShopUserMoneyChangeRecordService", value = ServiceNameConstants.SHOP_USER_SERVICE)
public interface RemoteShopUserMoneyChangeRecordService {

	/**
	 * 添加金额变更记录
	 * @param shopUserMoneyChangeRecord
	 * @param from
	 * @return
	 */
	@PostMapping("/money/change/record/addMoneyChange")
	R addMoneyChange(@RequestBody ShopUserMoneyChangeRecord shopUserMoneyChangeRecord,
			@RequestHeader(SecurityConstants.FROM) String from);

}
